home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Programmer Disk
/
The Programmer Disk (Microforum).iso
/
xpro
/
c3
/
pro24
/
cmtprog.h
< prev
next >
Wrap
C/C++ Source or Header
|
1986-08-07
|
1KB
|
50 lines
/* cmtprog.h -- include file for cmt application programs */
/* define true, false, private, boolean */
#include "cext.h"
#include "mpu.h"
/*
* override the definition of l_rest
*/
#define l_rest(d) m_rest(d)
#define l_restuntil(t) m_restuntil(t)
#define rest(x) l_rest( (long) x )
#define restuntil(x) l_restuntil( (long) x)
#define when if (
#define then ) {
#define otherwise ;} else {
#define endif ;}
#define endwhen ;}
#define begin {
#define end ;}
#define repeat(var, count) {int var; for (var=1; var <= count; var++) {
#define endrep ;}}
extern long event_time;
int moxc_loudness = 127;
#define loud(l) moxc_loudness = (l);
/* pnote -- play a note, return immediately */
/**/
void pnote(pitch, duration)
begin
midi_note(1, pitch, moxc_loudness);
cause(duration, midi_note, 1, pitch, 0);
end
/* note -- play a note, return after end of note */
/**/
void note(pitch, duration)
begin
midi_note(1, pitch, moxc_loudness);
rest(duration);
midi_note(1, pitch, 0);
end